# -*- coding: utf-8 -*-
__author__ = 'alex'

from xml.sax import make_parser
from wiki_page_parser import WikiPageParser
from db_routine import DBWriter


parser = make_parser()
parser.setContentHandler(WikiPageParser(DBWriter()))
parser.parse("/media/data/wiki/dumps/enwiki/enwiki-20111007-pages-articles.xml")
#parser.parse("aut_test.xml")
#parser.parse("test.xml")

#parser.setErrorHandler(SimpleErrorHandler())
#parser.parse("/media/data/wiki/dumps/enwiki/enwiki-20111007-pages-articles.xml")




#parser = make_parser()
#parser.setContentHandler(WikiPageParser(DBWriter()))
#parser.parse("test.xml")

#dbWriter = DBWriter()
#dbWriter.test()

